package com.study.demo.model;

import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

@Component
public class Cats {


    @Bean("cat1")
    public Cat cat1(){
        Cat cat = new Cat();
        cat.setId(1);
        cat.setName("小喵1");
        cat.setContent("喵喵喵1");
        return cat;
    }


    @Bean("cat2")
    public Cat cat2() {
        Cat cat = new Cat();
        cat.setId(2);
        cat.setName("小喵2");
        cat.setContent("喵喵喵2");
        return cat;
    }
}
